/************************************************************************

								Heroes IV
					  Copyright 2001, The 3DO Company

	------------------------------------------------------------------
  						 obelisk_reward_type.cpp

	$Header: $

	$NoKeywords: $

 ************************************************************************/


#include "precompiled.h"
#include "obelisk_reward_type.h"

#include "enum_operations.h"
#include "string_insensitive_compare.h"


// ------------------------------------------------------------------------------
// Keywords for t_obelisk_reward_type types
// ------------------------------------------------------------------------------
std::string const k_obelisk_reward_keywords[ k_obelisk_reward_count ] =
{
	"artifact",
	"material"
};

// ------------------------------------------------------------------------------
// Get t_obelisk_reward_type value for a keyword
// ------------------------------------------------------------------------------
t_obelisk_reward_type get_reward_type_from_keyword( std::string const & keyword )
{
	for (t_obelisk_reward_type type = t_obelisk_reward_type(0); type < k_obelisk_reward_count; enum_incr(type) )
	{
		if ( string_insensitive_compare( keyword, k_obelisk_reward_keywords[ type ] ) == 0 )
			return type;
	}

	return k_obelisk_reward_count;
}
